package com.toplabs.unashu.common.response;

import lombok.Getter;

/**
 * @author toplabs
 * @since 2022/08/09
 * <p>This java file was created by toplabs in 2022/08/09.
 * The following is the description information about this file:</p>
 * <p>description: 响应状态</p>
 */
@Getter
public enum ResponseStatus implements StatusCode {
    /**
     * 成功
     */
    SUCCESS(10000, "success"),
    /**
     * 失败
     */
    FAILED(10500, "failure"),
    /**
     * 资源不存在
     */
    NOT_FOUND(10404, "resource does not exist"),
    /**
     * 当前会话未登录
     */
    UNAUTHORIZED(10300, "the current session is not logged in"),
    /**
     * 没有令牌，需要身份验证
     */
    NOT_TOKEN(10301, "authentication required"),
    /**
     * 无效令牌
     */
    INVALID_TOKEN(10302, "token invalid"),
    /**
     * 令牌超时
     */
    TOKEN_TIMEOUT(10303, "token expires"),
    /**
     * 令牌已被顶替下线
     */
    BE_REPLACED(10304, "token has been replaced by the line"),
    /**
     * 令牌已被踢下线
     */
    KICK_OUT(10305, "token has been kicked off the line"),
    /**
     * 刷新令牌已超时
     */
    REFRESH_TOKEN_TIMEOUT(10306, "refresh token expires!"),
    /**
     * 签名验证失败
     */
    VALIDATE_FAILED_SIGN(10401, "invalid signature verification!"),
    /**
     * 参数验证失败
     */
    VALIDATE_FAILED(10402, "parameter validation failed!"),
    /**
     * 没有相关权限
     */
    FORBIDDEN(10403, "no relevant permissions!"),
    /**
     * 没有初始化
     */
    NOT_INITIALIZE(10404, "TopLabs system has not been initialized, Please perform the installation steps before using the TopLabs system.");

    private final int code;
    private final String message;

    ResponseStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
